package com.justrun.response;

/**
 * @description 结果代码枚举类
 * @author Chandler
 * @date 2020/09/17
 */
public enum ResultCodeEnum implements CustomizeErrorCode{

    SUCCESS(20000,"成功"),
    UNKOWN_ERROR(3000,"未知错误"),
    SYSTEM_BUSY(500,"服务器繁忙"),
    SERVICE_NOT_FOUND(404,"未找到该服务"),
    REQUEST_PARAM_ERROR(400,"请求参数错误"),
    AUTHORITY_ERROR(403,"权限错误"),
    SCHOOL_HAVENOT_SYSTEM(2000,"该学校没有购买本系统"),
    ACCOUNT_NOT_EXIST(2001,"账号不存在"),
    ACCOUNT_OR_PASSWORD_ERROR(2002,"账号或密码错误"),
    ORIGINAL_PASSWORD_ERROR(2003,"原始密码错误"),
    PASSWORD_UNCONSISTENT(2004,"两次密码不一致"),
    COLLEGE_CANNOT_READD(2005,"学院不可以重复添加"),
    FILE_EXPLAIN_ERROR(2006,"文件解析错误"),
    COLLEGE_NOT_ADD(20007,"学院未添加，请先添加学院"),
    CLASS_NOT_EXIST(2008,"班级未添加，请先添加班级"),
    COURSE_NOT_EXIST(2010,"课程未添加，请先添加课程"),
    CHARACTER_OUTOFLIMITED(2009,"字数超出限制"),
    RECORD_ALREADY_EXEST(2011,"记录已存在"),
    STUDENT_NOT_EXIST(2012,"该学生未添加，请先到学生信息管理中添加该学生"),
    FILE_FORMAT_ERROR(2013,"文件格式错误"),
    FILE_CONTENT_ERROR(2014,"文件内容错误"),
    INDOOR_NO_POSITION(6000,"室内运动无轨迹位置信息"),
    VERTIFYCODE_ERROR(6002,"验证码错误"),
    NO_LOGIN(6003,"未登录")
    ;

    private Integer code;

    private String message;

    ResultCodeEnum(Integer code,String message){
        this.code = code;
        this.message = message;
    }
    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMesssage() {
        return message;
    }
}
